Creating Axis Detent Ranges
|Drag Axis Animation||The main animation in a Drag Axis With Detents manipulator|
|Drag Rotate Animation||The main animation in a Drag Rotate With Detents manipulator|
|Detent Animation||The animation controlling the detent action|
These are made with either Blender Location or Rotation keyframes.
|Dataref 1 Keyframes||The dataref values and path used with the Drag Axis or Drag Rotate Animation|
|Dataref 2 Keyframes||The dataref values and path used with the Detent Animation|
These are made with X-Plane Keyframes. Their minimum and maximum do not have to be the real limits of a Dataref as defined in DataRefs.txt or a custom plugin.
|Maximum Drag Height||The maximum a detent stick can move from its origin, taken from the Location Animation|
|Axis Detent Range||A way of specifying the minimum height the manipulator must be at to move into the next section|
|Range Start and End||Defines the sub-range of Dataref 1 this range covers, its ends are inclusive|
|Range Height||The height of this section, between 0 and the Maximum Drag Height|
|Axis Detent Ranges table||All Axis Detent Ranges for this manipulator, with one or more ranges|
|Plateaus and Valleys||Using ranges, you can describe the "terrain" of the device for X-Plane to simulate. You can imagine this detent terrain as plateaus and valleys to move along and over|
|Pits||A range whose start and end are equal, and whose height is less than both its neighbors traps a user who is sliding the control instead of lifting it - without creating a real valley of any width|
With Axis Detent Ranges you are able to simulate a range of cockpit controls like never before!
Follow along with a working Throttle Quadrant With Detents example: axis_detent_range_tutorial.zip
Here is a rough chart showing our throttle quadrant from the example file.
The tiny thin line for the range
.75, .75, 0 is showing where the pit is. The 1 pixel of whitespace is for illustrative purposes only, it has no real width.
As you can see, because the Blender Animations, X-Plane Dataref Keyframes, and Axis Detent Ranges are all enforced to be synchronized, the graphs of minimum heights reflects the real object, whether you're looking at Datarefs or Blender Animations! This is no coincidence! (Unfortunately you'll have to use your imagination for the OBJ as the model is a plain cylinder and rectangular stick.)
Once you understand the concept, the rules for what is a valid Axis Detent Ranges table will hopefully be very straight forward.
Rules For Valid Axis Detent Ranges
Some rules may not be applicable or may seem pedantic if you only have one range, but one range is allowed!
- Axis Detent Ranges are only available for Detent related manipulators
- Manipulators with detents must have 1 or more Axis Detent Ranges
- The smart manipulator itself must be valid before Axis Detent Ranges will be checked
- The Dataref Keyframes have only one requirement: the minimum value must be less than the maximum. The whole range of values as defined in DataRefs.txt or a custom plugin do not need to be used. For example:
sim/cockpit2/engine/actuators/throttle_ratio_all hhas a real range is 0.0 to 1.0, but we can animate and use only
0.9as in the example
Range Start And End Rules
- A range's start must be less than or equal to its end
- The start of the 1st Axis Detent Range must be Dataref 1's minimum, the end of the last Axis Detent Range must be Dataref 1's maximum. Every other range's start must be the end of another
With these rules, the starts and ends of the Axis Detent Ranges table covers the full spectrum of Dataref 1 without any gaps or overlaps between ranges, in ascending order
Detent Dataref And Drag Height Rules
- The maximum height is determined by the distanced traveled in the Detent Animation
- Values for Height must be between 0 and maximum height
- The Detent Dataref range must not start or end with a negative number
- A stop pit is defined as a Range who's start and end are the same, giving it a width of 0. Its height must be less than each of it's neighbors, though 0 is commonly used
- A pit can be the first or last detent range, but never the only range
- Stop pegs, where height is equal to or greater than it's neighbor's height, are never allowed